package com.example.testproject.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.testproject.R
import com.example.testproject.bean.TikTopBean
import kotlinx.android.synthetic.main.item_tik_top_layout.view.*

/**
 *
 * @Author: android 超级兵
 * @CreateDate: 12/24/21$ 2:38 PM$
 * TODO
 */
class TikTopAdapter(
    data: List<TikTopBean>?
) : BaseQuickAdapter<TikTopBean, BaseViewHolder>(
    R.layout.item_tik_top_layout,
    data
) {
    override fun convert(helper: BaseViewHolder, item: TikTopBean) {

        helper
            .setText(R.id.tvTitle, item.title)
            .setText(R.id.tvComment, item.comment)

        helper.itemView.imageHead.setImageResource(item.url)

//        helper.itemView.imageHead.shadowBackground(mContext)
    }
}